package com.cyou.mrd.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.cyou.mrd.pojo.TaskInfo;
import com.cyou.mrd.service.ITaskInfoService;

@Controller
@RequestMapping("/taskinfo")
public class TaskInfoController {
	@Resource
	private ITaskInfoService taskInfoService;
	
	@RequestMapping("/testIntegration")
	public String toTest(HttpServletRequest request,Model model){
		int taskId = Integer.parseInt(request.getParameter("id"));
		TaskInfo taskInfo = this.taskInfoService.getTaskInfo(taskId);
		
		if (taskInfo != null) {
			System.out.println("****************" + taskInfo.getTaskName());
		}else {
			System.out.println("****************查询有问题啊，查不出来啊******************");
		}
		model.addAttribute("taskInfo", taskInfo);
		return "testIntegration";
	}
	
}
